﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace HelloWorldUI
{
    public partial class FormHelloWorld : Form
    {
        private string myString;
        private string[] args;
        public FormHelloWorld()
        {
            InitializeComponent();
        }

        public FormHelloWorld(string[] args)
        {
            // TODO: Complete member initialization
            InitializeComponent();
            this.args = args;
        }

        private void FormHelloWorld_Load(object sender, EventArgs e)
        {

            this.myString =e.ToString()+sender.ToString()+sender.GetType().ToString();
        }

        private void btn_OK_Click(object sender, EventArgs e)
        {
            string msg="CommandLineString:Len="+args.Length.ToString("D3")+" ";
            foreach(string sarg in args)
            {
                msg += sarg + "_";
            }
            DialogResult pressedKey= MessageBox.Show(text: msg, caption: "Test Box", buttons: MessageBoxButtons.YesNoCancel);
            if(pressedKey ==DialogResult.Yes)
            {
                this.SetDesktopLocation(40,50);

            }else if(pressedKey == DialogResult.No)
            {
                this.Close();

            }
            else
            {
                this.Close();
            }


        }


    }
}
